<template>
  <div class="myaddress">
    <div class="tit">
      我的住址
      <span>私の住所</span>
      <span class="fr" @click="operation">管理</span>
    </div>
    <ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media">
					<a href="javascript:;">
						<div class="mui-media-body">
							幸福 <span>17600000000</span>
							<p class="mui-ellipsis">日本台中 中区 中山路26号 ，近中山路绿川西街</p>
						</div>
            <div class="mui-media-footer" v-if="isDel">
              <div class="fr" @click="del">
                <img src="../../assets/images/icon5.png" alt="">
                <span>删除</span>
              </div>
            </div>
					</a>
				</li>
			</ul>
      <button class="addAddress" @click="addAddress">添加住址</button>
  </div>
</template>

<script>
import { MessageBox } from "mint-ui"
export default {

  data () {
    return {

      isDel:false
      
    }
  },

  methods: {
    operation(){
      this.isDel = !this.isDel
    },
    del(){
      MessageBox.confirm('确定执行此操作?').then(action => {
        console.log('删除成功')
      },action=>{
        console.log('删除失败')
      });
    },
    addAddress(){
      
      this.$router.push({name:'addAddress'})
    }
  },

  created () {
  }
}
</script>

<style lang='less'>
:before,:after{
  height:0 !important;
}
.mui-table-view-cell > a:not(.mui-btn){
  margin:0;
}
.myaddress{
  width:100%;
  position: relative;
  height:100%;
}
.addAddress{
    background: #FFFFFF;
    border: 1px solid #E7E7E7;
    box-shadow: 1px 8px 18px 0 rgba(0,0,0,0.03);
    border-radius: 15px;
    width:100%;
    font-size: 14px;
    color: #333333;
    position: absolute;
    bottom:20px;
    padding: 15px 0;
  }

.mui-table-view-cell{
  padding: 0px;
  background: #FFFFFF;
  border:1px solid #E7E7E7;
  box-shadow: 1px 8px 18px 0 rgba(0,0,0,0.03);
  border-radius: 15px;
  margin-top: 10px;
  .mui-media-body{
    font-size: 14px;
    color: #333333;
    font-weight: 600;
    padding: 20px 20px;
  }
  p{
    font-size: 14px;
    color: #666666;
    margin-top: 5px;
    font-weight: normal;
  }
  .mui-media-footer{
    border-top:1px solid #E7E7E7;
    overflow: hidden;
    .fr{
      padding: 15px;
    }
    img{
      width:18px;
    }
    span{
      font-size: 12px;
      line-height: 18px;
      display: block;
      float: right;
      margin: 0 5px;
      color: #999999;
    }
  }
}
</style>
